username = None
password = None
logupNum = 0
def init_session_state():
    global username, password, logupNum
    username = None
    password = None
    logupNum = 0

def set_session_state(*args):
    global username, password, logupNum
    if len(args) == 1:
        logupNum = args[0]
    elif len(args) == 3:
        username = args[0]
        password = args[1]
        logupNum = args[2]
    return logupNum

def get_session_state():
    global username, password, logupNum
    dict = {
        'username': username,
        'password': password,
        'logupNum': logupNum
    }
    return dict